Skip to content

Move runtime type generation to dedicated internal package#14589

Merged
jamesopstad merged 6 commits into
mainfrom
james/runtime-type-generation
Jul 9, 2026
Merged

Move runtime type generation to dedicated internal package#14589
jamesopstad merged 6 commits into
mainfrom
james/runtime-type-generation

Conversation

@jamesopstad

@jamesopstad jamesopstad commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Move runtime type generation to dedicated internal package.

This is a precursor to supporting the runtime type generation with the new config.

Note: this PR also fixes a bug where types weren't being cached when regenerated in wrangler dev.


  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
    • Additional testing not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: internal change

A picture of a cute animal (not mandatory, but encouraged)

@changeset-bot

changeset-bot Bot commented Jul 7, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 5cbc30a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
wrangler Patch
@cloudflare/vite-plugin Patch
@cloudflare/vitest-pool-workers Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

ask-bonk[bot]

This comment was marked as resolved.

ask-bonk[bot]

This comment was marked as resolved.

@ask-bonk

ask-bonk Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Review posted to PR #14589. Summary of what I found:

  • Duplicate constant (minor): DEFAULT_OUTFILE_RELATIVE_PATH is now both exported from @cloudflare/runtime-types and redefined locally in wrangler's runtime/index.ts, which violates the repo's "no duplicating constants across packages" rule. Provided a suggestion to import it instead.
  • Process note (non-blocking): The "Tests included/updated" box is checked, but the new package has no tests (its vitest glob matches nothing); coverage is inherited from existing wrangler tests.

The core refactor is behavior-preserving: nodejs_compat filtering, ENOENT-tolerant caching, the spy-friendly local adapter module, and external miniflare/workerd bundling config are all correct.

github run

@pkg-pr-new

pkg-pr-new Bot commented Jul 7, 2026

Copy link
Copy Markdown
@cloudflare/autoconfig

npm i https://pkg.pr.new/@cloudflare/autoconfig@14589

create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@14589

@cloudflare/deploy-helpers

npm i https://pkg.pr.new/@cloudflare/deploy-helpers@14589

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@14589

miniflare

npm i https://pkg.pr.new/miniflare@14589

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@14589

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@14589

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@14589

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@14589

@cloudflare/workers-auth

npm i https://pkg.pr.new/@cloudflare/workers-auth@14589

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@14589

@cloudflare/workers-utils

npm i https://pkg.pr.new/@cloudflare/workers-utils@14589

wrangler

npm i https://pkg.pr.new/wrangler@14589

commit: 5cbc30a

@jamesopstad jamesopstad force-pushed the james/runtime-type-generation branch 3 times, most recently from 6fcaf2b to c140741 Compare July 8, 2026 21:53
@jamesopstad jamesopstad changed the title Move runtime type generation to dedicated package Move runtime type generation to dedicated internal package Jul 8, 2026
@jamesopstad jamesopstad marked this pull request as ready for review July 8, 2026 21:55
@workers-devprod workers-devprod requested review from a team and NuroDev and removed request for a team July 8, 2026 21:56
@workers-devprod

workers-devprod commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Codeowners approval required for this PR:

  • ✅ @cloudflare/wrangler
Show detailed file reviewers

@jamesopstad jamesopstad added the ci:no-changeset-required Skip pull request checks for a valid changeset label Jul 8, 2026
devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

@jamesopstad jamesopstad force-pushed the james/runtime-type-generation branch from ff4bce3 to e3d79c8 Compare July 9, 2026 10:56
@jamesopstad jamesopstad removed the ci:no-changeset-required Skip pull request checks for a valid changeset label Jul 9, 2026
Comment thread packages/runtime-types/package.json
Comment thread packages/runtime-types/tsconfig.json
Comment thread packages/runtime-types/src/workerd.d.ts
Comment thread packages/runtime-types/src/runtime.ts
Comment thread packages/runtime-types/src/runtime.ts
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

✅ All changesets look good

@jamesopstad jamesopstad force-pushed the james/runtime-type-generation branch from e3d79c8 to cac25d1 Compare July 9, 2026 13:50

@workers-devprod workers-devprod left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codeowners reviews satisfied

@github-project-automation github-project-automation Bot moved this from Untriaged to Approved in workers-sdk Jul 9, 2026
@jamesopstad jamesopstad force-pushed the james/runtime-type-generation branch from cac25d1 to 014c7e3 Compare July 9, 2026 15:42
@jamesopstad jamesopstad merged commit 7b28392 into main Jul 9, 2026
67 of 68 checks passed
@jamesopstad jamesopstad deleted the james/runtime-type-generation branch July 9, 2026 16:24
@github-project-automation github-project-automation Bot moved this from Approved to Done in workers-sdk Jul 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants